import { createApp, createVNode } from "vue";
import App from "./App.vue";
import pinia from "@/store";
import router from "./router";
import * as Icons from "@element-plus/icons-vue";
import "@/assets/css/main.scss";
import "element-plus/theme-chalk/el-loading.css";
import { vLoading } from "element-plus/es/components/loading/src/directive";
import directives from "./directives";
const app = createApp(App);
const Icon = (props: { icon: string }) => {
  const { icon } = props;
  return createVNode(Icons[icon as keyof typeof Icons]);
};
app.component("Icon", Icon);
app.directive("loading", vLoading);
app.use(directives).use(router).use(pinia).mount("#app");
